//
//  KABExhBuyTicketTCell.m
//  kabu
//
//  Created by XiangDongMBP on 2017/3/8.
//  Copyright © 2017年 East. All rights reserved.
//

#import "KABExhBuyTicketTCell.h"
#import "KABModel.h"

@implementation KABExhBuyTicketTCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    [self.selBtn addTarget:self action:@selector(selBtnTapped:) forControlEvents:UIControlEventTouchUpInside];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)selBtnTapped:(UIButton *)btn {
    if ([self.delegate respondsToSelector:@selector(kABExhBuyTicketTCell:selBtnTapped:)]) {
        [self.delegate kABExhBuyTicketTCell:self selBtnTapped:btn];
    }
}

- (void)configViewWithDetTicketItem:(KABExhDetTicketItem *)item isSel:(BOOL)isSel {
    self.selBtn.selected = isSel;
    self.typeLabel.text = item.content;
    self.priceLabel.text = [NSString stringWithFormat:@"￥%.2f", item.original_price / 100.0];
}

@end
